package cn.com.tianpeidong.restaurantadmin.project.admin.desk.mapper;

import cn.com.tianpeidong.restaurantadmin.project.admin.desk.constant.DeskStatus;
import cn.com.tianpeidong.restaurantadmin.project.admin.desk.entity.DeskInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PatchMapping;

import java.util.List;

/**
 * @author tianpeidong
 * @version 创建时间: 19-6-8 下午7:38
 */
@Mapper
public interface DeskMapper {

    DeskInfo getById(@Param("id") Long id);

    List<DeskInfo> list();

    DeskInfo checkDeskCodeExist(@Param("deskCode") String deskCode);

    int insert(DeskInfo deskInfo);

    int update(DeskInfo deskInfo);

    int updateStatus(DeskInfo deskInfo);

    int updateStatusById(@Param("status") Integer busy, @Param("id") Long deskId);
}
